#封装函数

# def convert_currency(im,er):
#     out = im * er
#     return out
USD_VS_RMB = 6.77

def main():

    currency_str_value = input('请输入带单位的金额:')

    unit = currency_str_value[-3:]

    if unit == 'CNY':
        exchange_rate = 1 / USD_VS_RMB
    elif unit == 'USD':
        exchange_rate = USD_VS_RMB
    else:
        exchange_rate = -1
    if exchange_rate !=-1:
          in_money = eval(currency_str_value[:-3])
          convert_currency = lambda x: x * exchange_rate
          # Qut_money = convert_currency(in_money,exchange_rate)
          Qut_money = convert_currency(in_money)
          print('兑换后金额:',Qut_money,'$')
    else:
      print('不支持该货币~!')

if __name__ == '__main__':
        main()